The type theory and type checker of
نویسنده
چکیده
GF (Grammatical Framework) is a Logical Framework enriched with concrete syntax speciications. Ordinary type-theoretical judgements of typing and deenitional equality specify a theory. In addition, a judgement carries a description of how to produce a string in concrete syntax. The intended principal application area of GF is natural languages. It describes formal languages just as well, although less general tools exist that are optimized for them. Natural and formal languages can be combined in an interface to a proof editor of a logical framework by means of GF. Indeed, such an experimental interface has been made for Agda as an application of GF. This presentation focuses on matters familiar from syntax-directed editors of logical frameworks, although GF also has other applications: in semantically precise multilingual natural language documentation, and in compiling the programming language Shines. 1 Overview of GF This paper presents the type-theoretical structure and type checking principles of GF (Grammatical Framework). GF is a variant of Martin-LL of's higher-level type theory with metavariables and rules for concrete syntax, based on type-theoretical grammar (Ranta 1994). We shall use the term type theory for Martin-LL of's higher-level type theory. Section 2 contains the basic rules of type theory that GF uses. Consider the following speciication of a fragment of arithmetic in type theory extended with deenitions by pattern equations, as in ALF. We would usually like to use a less formal concrete syntax instead of the above abstract syntax. Logical frameworks do not help here, although many have a user interface with layout conventions. They might allow a concrete syntax where 0 stands for zero, x' for succ(x), (x+y) for sum(x,y), and x=y for EqNat(x,y). In GF one may replace these layout conventions by logically rigorous concrete syntax deenitions in the framework itself. This is done by extending the above type-theoretical theory into the GF grammar Nat, Prop : cat zero : Nat-"0" succ : (x:Nat)Nat-x "'" sum : (x:Nat)(y:Nat)Nat-"(" x "+" y ")" sum(x,zero) = x : Nat sum(x,succ(y)) = succ(sum(x,y)) : Nat EqNat : (x:Nat)(y:Nat)Prop-x "=" y
منابع مشابه
Effectiveness of training on preventative nutritional behaviors for type-2 diabetes among the female adolescents: Examination of theory of planned behavior
Background: Since type-2 diabetes is the most common chronic disease among Iranian female adolescents, we applied theory of planned behavior to examine the effect of training to intention to preventative nutritional behaviors for type-2 diabetes among female adolescents. Methods: In this experimental study 200 (11-14 year old) girls from 8 schools of Tehran city (100 in each intervent...
متن کاملThe Effect of Education Based on the Theory of Planned Behavior in Choosing the Type of Delivery in Pregnant Women
Introduction: Although cesarean section has saved the lives of countless mothers and infants, in many cases, medical necessities do not lead to cesarean delivery, but misbehavior has led to cesarean delivery. Therefore, the present study was conducted to determine the effect of education based on the theory of planned behavior in choosing the type of delivery in pregnant women referred to the M...
متن کاملFault Detection Based on Type 2 Fuzzy system for Single-Rod Electrohydraulic Actuator
Electro-hydraulic systems with regards to the their specific features and applications among other industrial systems including mechanical, electrical and pneumatic systems, have been widely taken into consideration by the scientists and researchers. Due to the fact that the electro-hydraulic system is inherently a nonlinear system, has some problems such as signals saturation, nonlinear effici...
متن کاملBulk Viscous Bianchi Type VI0 Cosmological Model in the Self-creation Theory of Gravitation and in the General Theory of Relativity
In the second self-creation theory of gravitation and in the general theory of relativity, Bianchi type VI0 cosmological model in the presence of viscous fluid is studied. An exact solution of the field equations is given by considering the cosmological model yields a constant decelerations parameter q=constant and the coefficients of the metric are taken as A(t)=[c1t+c<su...
متن کاملOn the buckling analysis of functionally graded sandwich beams using a unified beam theory
In this paper, a unified beam theory is developed and applied to study the buckling response of two types of functionally graded sandwich beams. In the first type (Type A), the sandwich beam has a hardcore whereas in the second type (Type B), the sandwich beam has a softcore. In both the type of beams, face sheets are made up of functionally graded material. The material properties of face shee...
متن کاملFuzzy type theory with partial functions
This paper is a study of fuzzy type theory (FTT) with partial functions. Out of several possibilities we decided tointroduce a special value ”∗” that represents ”undefined”. In the interpretation of FTT, this value lays outside of thecorresponding domain. In the syntax it can be naturally represented by the description operator acting on the empty(fuzzy) set, because choosing an element from it...
متن کامل